/*******************************************************************
 * Copyright (c) 2013 珠海比特讯科技有限公司. All rights reserved.
 * （1）软件的版权将受到法律保护，不允许非经授权的使用；
 * （2）未经版权所有人授权，任何人不得修改、复制和传播软件源代码、图片及其它资源等；
 * （3）未经版权所有人授权，不允许对软件进行修改；
 * （4）未经版权所有人授权，不允许在该软件的基础上开发新的软件；
 * （5）珠海比特讯科技有限公司拥有最终解释权
 *******************************************************************/
package youxiao.bytezon.views.teacher_lesson_premiums;

import java.math.BigDecimal;
import java.time.LocalDate;

import youxiao.bytezon.models.TeacherLessonPremium;
import youxiao.bytezon.utils.BeanUtil;
import youxiao.bytezon.views.course_details.CourseDetailView;

public class TeacherLessonPremiumView {

	private long id;
	private BigDecimal premiumAmount;
	private LocalDate billingDate;
	private CourseDetailView courseDetail;
	private String courseName;
	private String schoolName;
	
	public TeacherLessonPremiumView(TeacherLessonPremium teacherLessonPremium) {
		BeanUtil.copyTableProps(teacherLessonPremium, this);
		
		this.courseDetail = new CourseDetailView();
		BeanUtil.copyTableProps(teacherLessonPremium.getCourseDetail(), this.courseDetail);
		
		this.setCourseName(teacherLessonPremium.getCourseDetail().getCourse().getFullName());
		this.setSchoolName(teacherLessonPremium.getCourseDetail().getSchool().getName());
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public BigDecimal getPremiumAmount() {
		return premiumAmount;
	}

	public void setPremiumAmount(BigDecimal premiumAmount) {
		this.premiumAmount = premiumAmount;
	}

	public LocalDate getBillingDate() {
		return billingDate;
	}

	public void setBillingDate(LocalDate billingDate) {
		this.billingDate = billingDate;
	}

	public CourseDetailView getCourseDetail() {
		return courseDetail;
	}

	public void setCourseDetail(CourseDetailView courseDetail) {
		this.courseDetail = courseDetail;
	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getSchoolName() {
		return schoolName;
	}

	public void setSchoolName(String schoolName) {
		this.schoolName = schoolName;
	}

}
